package com.cc.model.convert

import com.cc.model.ScriptMonitor
import com.cc.model.dto.ScriptMonitorDto
import org.mapstruct.*

@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE, componentModel = MappingConstants.ComponentModel.SPRING)
abstract class ScriptMonitorConvert {

    abstract fun toEntity(scriptMonitorDto: ScriptMonitorDto): ScriptMonitor

    abstract fun toDto(scriptMonitor: ScriptMonitor): ScriptMonitorDto

    @BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
    abstract fun partialUpdate(scriptMonitorDto: ScriptMonitorDto, @MappingTarget scriptMonitor: ScriptMonitor): ScriptMonitor
}